fix(7696): scrollable settings popup on short viewports#7703
fix(7696): scrollable settings popup on short viewports#7703JohnMcLear merged 3 commits intodevelopfrom
Conversation
Move max-height + overflow:auto out of the mobile-only media query and onto the base .popup-content rule so the Settings popup (and other popups) gain a scrollbar instead of cropping items off-screen when the window is short. Pad-wide Settings is the worst offender because it adds a second column of controls plus a Delete pad button. Adds a Playwright regression test that verifies the popup is scrollable and the Delete pad button is reachable at a 900x500 viewport. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
ⓘ You've reached your Qodo monthly free-tier limit. Reviews pause until next month — upgrade your plan to continue now, or link your paid account if you already have one. |
Review Summary by QodoFix settings popup scrollability on short viewports with regression test
WalkthroughsDescription• Fix settings popup cropping items off-screen on short viewports • Move scrolling styles from mobile-only media query to base popup • Add Playwright regression test for popup scrollability at 900×500 • Preserve chat panel's overflow behavior for color-picker floats Diagramflowchart LR
A["Short viewport<br/>900×500"] -->|"Previously cropped<br/>items off-screen"| B["Settings popup<br/>overflow hidden"]
A -->|"After fix:<br/>scrollable"| C["Popup scrolls<br/>Delete pad reachable"]
D["CSS changes"] -->|"Move max-height<br/>+ overflow-y:auto"| E["Base .popup-content<br/>rule"]
D -->|"Preserve chat<br/>overflow:visible"| F["#users .popup-content<br/>exception"]
G["Playwright test"] -->|"Verifies scrollability<br/>at 900×500"| H["Regression coverage"]
File Changes1. src/tests/frontend-new/specs/pad_settings.spec.ts
|
Code Review by Qodo
1.
|
Qodo flagged that making .popup-content a scroll container clips absolutely-positioned descendants — so the Settings popup's font and language dropdowns can be truncated when their list extends past the popup's scroll bounds on short viewports. Mirror the existing toolbar workaround: when a nice-select sits inside .popup-content, switch the list to position:fixed (CSS) and place it with viewport-relative coordinates from getBoundingClientRect (JS), respecting the existing reverse class for upward-opening lists. Also relax the regression test per Qodo: drop the brittle scrollHeight > clientHeight assertion in favour of asserting the popup declares overflow-y:auto and proving Delete pad is initially off-screen, then reachable via scroll. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Thanks @qodo-free-for-open-source-projects — both addressed in 26cebda.
|
When a nice-select inside a popup-content scroll container sits in the lower half of the viewport, the JS adds the .reverse class so the list opens upward. The default .reverse rule sets bottom: calc(100% + 5px), which is fine when the list is position:absolute relative to its parent — but with the position:fixed treatment the popup branch uses, that percentage resolves against the viewport and pushes the list ~100vh above the screen, so it appears not to open at all until you scroll to the bottom of the popup (where .reverse no longer triggers). Override the rule for both .toolbar and .popup so .reverse drops back to bottom: auto and JS-set `top` controls placement, with a JS belt-and- braces also setting `bottom: auto` inline. Adds a Playwright regression test that scrolls the settings popup to the bottom, opens the Pad-wide font dropdown, and asserts the list is both visible and inside the viewport. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Summary
max-height+overflow-y:autofrom the mobile-only (max-width:800px) media query onto the base.popup-contentrule so all popups stay scrollable at any viewport width. The chat panel (#users) keepsoverflow:visibleso the colour-picker can float outside it.Fixes #7696
Test plan
pnpm run ts-check— clean for changed files (pre-existing errors are all underplugin_packages/)settings popup stays scrollable when the viewport is short🤖 Generated with Claude Code